<?php

namespace app\common\model\book;

use think\Model;
use think\model\concern\SoftDelete;

class BookSection extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $autoWriteTimestamp = 'datetime';

    public function book()
    {
        return $this->belongsTo('Book');
    }

    public function article()
    {
        return $this->belongsToMany('app\\common\\model\\article\\Article','app\\common\\model\\article\\ArticleAccessBookSection');
    }
}
